Repository navigation
fix(canvas): draw the frame size badge above neighbouring frames - #460
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
[Low impact] The change affects only how the canvas draws a selected frame’s size badge. The change appears safe to merge, with a non-blocking request to test the badge above an overlapping frame. Findings
SummaryMoves the selected frame's size badge above the world and pixel grid, while keeping it below the rulers.
Reviews (1) · Last reviewed commit: "fix(canvas): draw the frame size badge a..." · Reviewed by Greptile |
| {/* the selected frame's size badge, in screen px (FrameLabelLayer); after | ||
| the world so no frame, however it stacks, covers it */} | ||
| <div className="pointer-events-none absolute inset-0" ref={setLabelLayer} /> |
There was a problem hiding this comment.
frameResizeBrowser.test.ts uses a separate fixture that still places its label layer before the world. It only checks the badge's text, so it passes with either version of this change and cannot catch the badge being hidden again.
Add a browser test that mounts Stage with a neighboring frame overlapping the selected frame's badge. Check that the badge paints above that frame at a zoomed-out level.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Added tests/frameSizeBadgeBrowser.test.ts: it mounts the real Stage (rulers fixture) at 25% with a second frame under the selected one's badge, and checks the badge is the topmost element at its centre with a frame underneath. It fails against the previous Stage.tsx and passes with this change.
…frame Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ize-badge # Conflicts: # src/components/Stage.tsx
Design tokens, prototypes, page backgrounds, version restores, Figma imports, every export and Copy as PNG, rich text formatting and SVG / PDF imports sent no events. Features agents can reach now report from the server at the route, MCP tool and resident tool, on the person the work belongs to and with where it came from, so agent use is counted too. The browser-only ones capture with posthog-js, and every export, whichever control started it, lands as one frames_exported with its source. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 78d0c3acb78dcb5010727afb93921c5e63e62137)
The selected frame's
W × Hbadge lives in a screen-space layer (FrameLabelLayer) that was mounted before the zoomed world, so any frame overlapping its spot (common when zoomed out) painted over it.The layer now mounts after the world and the pixel grid, below the rulers, so the badge is always on top of frames.
Tests: typecheck,
frameResizeBrowser.test.ts.🤖 Generated with Claude Code